package com.piaodekuai.flight.web;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

//@RestController
@Controller
public class userController {

    @RequestMapping("/login")
    public String login(Model m) throws Exception {

        if(false){
            throw new Exception("some exception");
        }

        //return "Hello Spring Boot!";
        return "user/login";
    }


    @RequestMapping("/register")
    public String register(Model m) throws Exception {

        if(false){
            throw new Exception("some exception");
        }

        //return "Hello Spring Boot!";
        return "user/register";
    }

    @RequestMapping("/setpwd")
    public String setpwd(Model m) throws Exception {

        if(false){
            throw new Exception("some exception");
        }

        //return "Hello Spring Boot!";
        return "user/setpwd";
    }

    @RequestMapping("/registersucc")
    public String registersucc(Model m) throws Exception {

        if(false){
            throw new Exception("some exception");
        }

        //return "Hello Spring Boot!";
        return "user/registersucc";
    }

}
